from moviepy import *
import os
# 假设有 3 个视频
subject = 'dataset\\wz_1'
video_paths = []
for i in range(6):
    video_paths.append(os.path.join(subject,f"{i}.mp4"))

# 读取视频
clips = [VideoFileClip(p) for p in video_paths]

# 拼接成水平排列（单行）
final_clip = clips_array([clips])  # 注意：clips_array 接受二维列表，[ [clip1, clip2, ...] ]

# 输出视频
final_clip.write_videofile(f"{subject}\\concat.mp4", codec="libx264", fps=clips[0].fps)
